Vue.component("txx",{
    template:`
<div>
    <header>
        <div class="c900 flex">
            <a href="index.html"><h1>天下行汽车租赁平台</h1></a>
            <span class="flex">
                <login prefix="" ref="a" @logined="a">
                    <template #nologin>
                        <a href="register.html">注册</a>
                        <a href="login.html">登录</a>
                        <a href="addCar.html">添加车辆</a>
                    </template>
                    <template #logined="a">
                        <a href="addCar.html">添加车辆</a>
                        <a><el-avatar :src="a.user.headimg"></el-avatar></a>
                        <a href="forgetPwd.html">修改密码</a>
                        <a href="orders.html">我的订单</a>
                        <a href="/login/logout">退出</a>
                    </template>
                </login>
            </span>
        </div>
    </header>
</div>   
    `,
    data(){
       return{
           myinfo: {},
       }
    },
    // 创建钩子函数
    created(){
    },

    methods:{
        a(myinfo){
            this.myinfo = myinfo;
            this.$emit("myinfo",this.myinfo);
        }
    },
})